# -*- coding:utf-8 -*-
import socket

# 1. 获取目标ip和port
dst_Host = '127.0.0.1'
dst_Port = 8080
# 2. 创建UDP套接字
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# 3. 发送数据
client.sendto('AAABBBCCC'.encode('utf-8'), (dst_Host, dst_Port))
# 4. 接收数据
recv_data, server_addr = client.recvfrom(4096)
# 5. 打印数据
print(recv_data.decode('gbk'))
